com.supermap.ar.areffect
Class ARVideoElement
- java.lang.Object
-
- com.supermap.ar.areffect.AREffectElement
-
- com.supermap.ar.areffect.ARVideoElement
-
public class ARVideoElement extends AREffectElement
AR video elements
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.supermap.ar.areffect.AREffectElement
AREffectElement.onRenderableLoadCompleteListener, AREffectElement.OnTapListener, AREffectElement.OnTouchListener, AREffectElement.PositionType
-
-
Constructor Summary
Constructors Constructor and Description ARVideoElement(android.content.Context context)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
getBackGroundView()
Gets the background viewandroid.media.MediaPlayer
getMediaPlayer()
Gets the playerboolean
isLoopFlag()
Gets the loop statusvoid
loadModel(int resourceId)
Loads videos by their ids.void
loadModel(android.media.MediaPlayer mediaPlayer)
Loads AR videos' elementsvoid
loadModel(java.lang.String resourceUri)
by videos' uri Loads AR videos' elementsvoid
pause()
Pausesvoid
setBackGroundView(int resourceId)
Loads the background view in combination with setMediaPlayer() For example: MediaPlayer mediaPlayer = MediaPlayer.create(this,R.raw.huawei3); videoElement = new ARVideoElement(this); videoElement.setBackGroundView(R.layout.ar_video_key_1920x1080); videoElement.loadModel(mediaPlayer); videoElement.setParentNode(parentElement);void
setLoopFlag(boolean loopFlag)
Sets whether to loop the animationvoid
start()
Play the videovoid
stop()
Stops-
Methods inherited from class com.supermap.ar.areffect.AREffectElement
addChild, addChilds, addOnTapListener, addOnTouchListener, clearAllChilds, destroy, getAllChilds, getChild, getChild, getChild, getChildCount, getElementType, getId, getLocalScaleFactor, getOnRenderableLoadCompleteListener, getPosition, getPositionType, getRelativePosition, getRotationAngle, getRotationAxis, getScaleFactor, getWGSCoordinates, isShadowCaster, isShadowReceiver, isTransformable, isVisible, removeChild, removeChild, removeChild, removeChild, removeOnTapListener, removeOnTouchListener, setElementName, setLocalScaleFactor, setOnRenderableLoadCompleteListener, setParentNode, setParentNode, setParentNode, setPosition, setRelativePosition, setRelativePosition, setRotateAlwaysToCamera, setRotateToCameraType, setRotationAngle, setScaleFactor, setShadowCaster, setShadowReceiver, setTransformable, setVisiblity, setWGSCoordinates
-
-
-
-
Constructor Detail
-
ARVideoElement
public ARVideoElement(android.content.Context context)
The constructor.- Parameters:
context
-
-
-
Method Detail
-
isLoopFlag
public boolean isLoopFlag()
Gets the loop status- Returns:
-
setLoopFlag
public void setLoopFlag(boolean loopFlag)
Sets whether to loop the animation- Parameters:
loopFlag
-
-
loadModel
public void loadModel(int resourceId)
Loads videos by their ids.- Parameters:
resourceId
-
-
loadModel
public void loadModel(java.lang.String resourceUri)
by videos' uri Loads AR videos' elements- Parameters:
resourceUri
-
-
loadModel
public void loadModel(android.media.MediaPlayer mediaPlayer)
Loads AR videos' elements- Parameters:
mediaPlayer
-
-
setBackGroundView
public void setBackGroundView(int resourceId)
Loads the background view in combination with setMediaPlayer() For example: MediaPlayer mediaPlayer = MediaPlayer.create(this,R.raw.huawei3); videoElement = new ARVideoElement(this); videoElement.setBackGroundView(R.layout.ar_video_key_1920x1080); videoElement.loadModel(mediaPlayer); videoElement.setParentNode(parentElement);- Parameters:
resourceId
-
-
getBackGroundView
public int getBackGroundView()
Gets the background view- Returns:
-
getMediaPlayer
public android.media.MediaPlayer getMediaPlayer()
Gets the player- Returns:
-
start
public void start()
Play the video
-
pause
public void pause()
Pauses
-
stop
public void stop()
Stops
-
-